# -*- coding: utf-8 -*-
import scrapy


class BaseItem(scrapy.Item):
    caseUrl = scrapy.Field()  # 案例url
    fetchTime = scrapy.Field()  # 爬取时间
    updateTime = scrapy.Field()  # 更新时间
    cityId = scrapy.Field()  # 城市ID
    caseId = scrapy.Field()  # 案例id
    provinceName = scrapy.Field()  # 省份
    cityName = scrapy.Field()  # 城市
    districtName = scrapy.Field()  # 行政区
    title = scrapy.Field()  # 案例标题
    totalPrice = scrapy.Field()  # 案例总价
    price = scrapy.Field()  # 案例单价
    lng = scrapy.Field()  # 经度
    lat = scrapy.Field()  # 纬度
    monthlyRental = scrapy.Field()  # 月租金
    dailyRental = scrapy.Field()  # 日租金
    category = scrapy.Field()  # 类型   出租 or 出售
    houseAdvantages = scrapy.Field()  # 房源亮点
    paymentMethod = scrapy.Field()  # 押付
    minimumLeaseTerm = scrapy.Field()  # 起租期
    sr = scrapy.Field()  # 房源
    siteName = scrapy.Field()  # 房源（中文名）
    address = scrapy.Field()  # 地址
    listingDate = scrapy.Field()  # 发布时间
    buildArea = scrapy.Field()  # 建筑面积


# 商铺
class ShopsItem(BaseItem):
    projectId = scrapy.Field()  # 楼盘id
    shangQuan = scrapy.Field()  # 商圈
    name = scrapy.Field()  # 楼盘名称
    openingTime = scrapy.Field()  # 开盘日期
    propertyType = scrapy.Field()  # 物业类型
    floorLevels = scrapy.Field()  # 案例楼层
    totalFloor = scrapy.Field()  # 总层数
    specs = scrapy.Field()  # 规格
    operationState = scrapy.Field()  # 经营状态
    operationType = scrapy.Field()  # 经营类型
    prospectiveReturn = scrapy.Field()  # 预期收益
    cost = scrapy.Field()  # 相关费用
    customer = scrapy.Field()  # 客流人群
    surroundingCustomer = scrapy.Field()  # 周边客流
    businessFormat = scrapy.Field()  # 适合行业
    serviceIntroduction = scrapy.Field()  # 服务介绍
    support = scrapy.Field()  # 配套
    remainingLeaseTerm = scrapy.Field()  # 剩余租期
    shopNature = scrapy.Field()  # 商铺性质  比如：二手房、二手商铺
    width = scrapy.Field()  # 面宽
    depth = scrapy.Field()  # 进深
    floorHeight = scrapy.Field()  # 层高
    sellingPoint = scrapy.Field()  # 核心卖点
    transportFacility = scrapy.Field()  # 交通出行
    propertyCompany = scrapy.Field()  # 物业公司
    tag = scrapy.Field()  # 标签
    form = scrapy.Field()  # 形态
    other = scrapy.Field()  # 其它
    decorationState = scrapy.Field()  # 装修情况
    highQualityHouse = scrapy.Field()  # 优质房情况
    buildingName = scrapy.Field()  # 楼栋名称
    propertyAdvantages = scrapy.Field()  # 物业特色
    communityMark = scrapy.Field()  # 楼盘特色(项目特色)
    isStreet = scrapy.Field()  # 是否临街
    floorType = scrapy.Field()  # 楼层类型
    shopType = scrapy.Field()  # 商铺类型 比如：商业街商铺 or 临街门面
    projectBrief = scrapy.Field()  # 房源描述
    completionDate = scrapy.Field()  # 竣工时间
    projectAvgPrice = scrapy.Field()  # 在售均价
    projectAvgRental = scrapy.Field()  # 在租均价
    grossBuildArea = scrapy.Field()  # 总建筑面积
    elevator = scrapy.Field()  # 电梯数量
    loopLocation = scrapy.Field()  # 环线位置
    buildType = scrapy.Field()  # 建筑类别
    coverageArea = scrapy.Field()  # 占地面积
    standardLayerArea = scrapy.Field()  # 标准层面积
    openArea = scrapy.Field()  # 开间面积
    floorAreaRatio = scrapy.Field()  # 容积率
    greeningRate = scrapy.Field()  # 绿化率
    developerName = scrapy.Field()  # 开发商
    parkingNum = scrapy.Field()  # 停车位
    floorOverGround = scrapy.Field()  # 地上层数
    floorUnderGround = scrapy.Field()  # 地下层数
    isDivision = scrapy.Field()  # 可否分割
    propertyFee = scrapy.Field()  # 物业费
    innerArea = scrapy.Field()  # 套内面积
    transferFee = scrapy.Field()  # 转让费
    entryDate = scrapy.Field()  # 入驻时间
    rentFreePeriod = scrapy.Field()  # 免租期
    surroundingInfo = scrapy.Field()  # 周边信息
    transportInfo = scrapy.Field()  # (楼盘)交通信息
    occupancyRate = scrapy.Field()  # 得房率
    propertyYears = scrapy.Field()  # 产权年限


# 写字楼
class OfficeItem(BaseItem):
    projectId = scrapy.Field()  # 楼盘id
    name = scrapy.Field()  # 楼盘名称
    otherName = scrapy.Field()  # 其他名称
    shangQuan = scrapy.Field()  # 商圈
    projectAvgPrice = scrapy.Field()  # 楼盘平均售价
    projectAvgRental = scrapy.Field()  # 楼盘平均租金
    rentableArea = scrapy.Field()  # 可租面积
    saleableArea = scrapy.Field()  # 可售面积
    developerName = scrapy.Field()  # 开发商
    grossBuildArea = scrapy.Field()  # 总建筑面积
    propertyCompany = scrapy.Field()  # 物业公司
    occupancyRate = scrapy.Field()  # 得房率
    propertyType = scrapy.Field()  # 物业类型
    parkingNum = scrapy.Field()  # 停车位
    completionDate = scrapy.Field()  # 竣工时间
    propertyFee = scrapy.Field()  # 物业费
    propertyYears = scrapy.Field()  # 产权年限
    grade = scrapy.Field()  # 物业形态
    coverageArea = scrapy.Field()  # 占地面积
    officeArea = scrapy.Field()  # 办公面积
    greeningRate = scrapy.Field()  # 绿化率
    floorAreaRatio = scrapy.Field()  # 容积率
    floorOverGround = scrapy.Field()  # 地上层数
    floorUnderGround = scrapy.Field()  # 地下层数
    elevator = scrapy.Field()  # 电梯配套
    airConditioner = scrapy.Field()  # 空调配套
    network = scrapy.Field()  # 网络通信
    communityMark = scrapy.Field()  # 楼盘特色(项目特色)
    projectSupport = scrapy.Field()  # 配套设施
    decorationState = scrapy.Field()  # 装修情况
    floorType = scrapy.Field()  # 楼层类型
    utilization = scrapy.Field()  # 使用率
    workingSeat = scrapy.Field()  # 工位数
    projectBrief = scrapy.Field()  # 房源描述（项目简介）
    support = scrapy.Field()  # 配套
    isDivision = scrapy.Field()  # 是否分割
    caseGrade = scrapy.Field()  # 案例等级
    buildType = scrapy.Field()  # 建筑类别
    loopLocation = scrapy.Field()  # 环线位置
    saleableNum = scrapy.Field()  # 在售套数
    totalFloor = scrapy.Field()  # 总层数
    standardLayerArea = scrapy.Field()  # 标准层面积
    floorLevels = scrapy.Field()  # 所在楼层
    entryDate = scrapy.Field()  # 入驻时间
    innerArea = scrapy.Field()  # 套内面积
    propertyService = scrapy.Field()  # 物业服务
    bathroom = scrapy.Field()  # 卫生间
    parkingFacilities = scrapy.Field()  # 车位配套信息
    officeFloor = scrapy.Field()  # 办公总层数
    deliverCriterion = scrapy.Field()  # 交房标准
    openingTime = scrapy.Field()  # 开盘时间
    mainUnit = scrapy.Field()  # 主要户型
    investors = scrapy.Field()  # 投资商
    cost = scrapy.Field()  # 相关费用
    buildingName = scrapy.Field()  # 楼栋名称
    areaSegment = scrapy.Field()  # 楼盘面积段
    highQualityHouse = scrapy.Field()  # 优质房情况
    propertyAdvantages = scrapy.Field()  # 物业特色
    transportFacility = scrapy.Field()  # 交通出行
    other = scrapy.Field()  # 其它
    disgustFacility = scrapy.Field()  # 嫌恶设施
    netFloorHeight = scrapy.Field()  # 净层高
    floorHeight = scrapy.Field()  # 层高
    layerArea = scrapy.Field()  # 单层面积
    securitySystem = scrapy.Field()  # 安防系统
    facadeDecoration = scrapy.Field()  # 外立面装修
    lobbyDecoration = scrapy.Field()  # 大堂装修
    corridorDecoration = scrapy.Field()  # 公共走廊装修
    elevatorLobby = scrapy.Field()  # 电梯前厅
    buildSupport = scrapy.Field()  # 楼内配套
    buildYear = scrapy.Field()  # 建筑年代
    locationArea = scrapy.Field()  # 所属区域
    sourceDescription = scrapy.Field()  # 房源描述
    officeType = scrapy.Field()  # 写字楼类型/等级
    openArea = scrapy.Field()  # 开间面积
    officeNature = scrapy.Field()  # 写字楼性质  比如：二手写字楼
    serviceIntroduction = scrapy.Field()  # 服务介绍
    isRegister = scrapy.Field()  # 是否可注册
    projectUrl = scrapy.Field()  # 楼盘url


# 厂房
class WorkshopItem(BaseItem):
    factoryType = scrapy.Field()  # 厂房类型
    minimumLeaseArea = scrapy.Field()  # 起租面积
    locationArea = scrapy.Field()  # 区域
    leaseMethod = scrapy.Field()  # 租赁方式
    isEIA = scrapy.Field()  # 可办环评
    floorType = scrapy.Field()  # 楼层
    firstFloorHeight = scrapy.Field()  # 首层层高
    factoryNew = scrapy.Field()  # 厂房新旧
    factoryStructure = scrapy.Field()  # 厂房结构
    floorBearing = scrapy.Field()  # 楼板承重
    supplyVoltage = scrapy.Field()  # 供电电压
    fireRecord = scrapy.Field()  # 消防备案
    factoryAdvantages = scrapy.Field()  # 厂房特色
    managementFee = scrapy.Field()  # 管理费
    transferFee = scrapy.Field()  # 转让费
    remainingLeaseTerm = scrapy.Field()  # 剩余租期
    support = scrapy.Field()  # 配套
    totalFloor = scrapy.Field()  # 总楼层
    name = scrapy.Field()  # 楼盘名称
    projectBrief = scrapy.Field()  # 房源描述
    shanQuan = scrapy.Field()  # 商圈
    landQuality = scrapy.Field()  # 土地性质
    propertyYears = scrapy.Field()  # 产权年限


# 仓库
class WarehouseItem(BaseItem):
    warehouseType = scrapy.Field()  # 仓库类型
    minimumLeaseArea = scrapy.Field()  # 起租面积
    locationArea = scrapy.Field()  # 区域
    leaseMethod = scrapy.Field()  # 租赁方式
    floorType = scrapy.Field()  # 楼层
    firstFloorHeight = scrapy.Field()  # 首层层高
    warehouseStructure = scrapy.Field()  # 仓库结构
    transferFee = scrapy.Field()  # 转让费
    remainingLeaseTerm = scrapy.Field()  # 剩余租期
    flatMaterial = scrapy.Field()  # 地平材质
    fireGrade = scrapy.Field()  # 消防等级
    unloadingMethod = scrapy.Field()  # 卸货
    supplyVoltage = scrapy.Field()  # 供电电压
    warehouseAdvantages = scrapy.Field()  # 仓库特色
    unloadingEquipment = scrapy.Field()  # 卸货设备
    flatBearing = scrapy.Field()  # 地平承重
    isBonded = scrapy.Field()  # 保税仓
    isEIA = scrapy.Field()  # 可办环评
    propertyYears = scrapy.Field()  # 产权年限
    entryCondition = scrapy.Field()  # 进车情况
    support = scrapy.Field()  # 配套
    landQuality = scrapy.Field()  # 土地性质


# 土地
class LandItem(BaseItem):
    locationArea = scrapy.Field()  # 区域
    leaseMethod = scrapy.Field()  # 租赁方式
    landOwnership = scrapy.Field()  # 所有权 比如：集体土地
    planningUse = scrapy.Field()  # 规划用途
    downpayment = scrapy.Field()  # 首付
    transferFee = scrapy.Field()  # 转让费
    remainingLeaseTerm = scrapy.Field()  # 剩余租期


# 车位
class ParkingItem(BaseItem):
    parkingType = scrapy.Field()  # 车位类型  比如：地下车库
    locationArea = scrapy.Field()  # 区域
    downpayment = scrapy.Field()  # 首付
    transferFee = scrapy.Field()  # 转让费
    remainingLeaseTerm = scrapy.Field()  # 剩余租期
    leaseMethod = scrapy.Field()  # 租赁方式


# 楼盘
class ProjectItem(scrapy.Item):
    cityName = scrapy.Field()  # 城市
    districtName = scrapy.Field()  # 行政区
    projectName = scrapy.Field()  # 楼盘名
    projectUrl = scrapy.Field()  # 楼盘url
    projectId = scrapy.Field()  # 楼盘id
    priceTrends = scrapy.Field()  # 价格趋势
    siteName = scrapy.Field()  # 房源（中文名）
    fetchTime = scrapy.Field()  # 爬取时间


# landchina 供地结果
class LandChinaItem(scrapy.Item):
    cityName = scrapy.Field()  # 城市
    districtName = scrapy.Field()  # 行政区
    siteName = scrapy.Field()  # 房源（中文名）
    category = scrapy.Field()  # 类别

    gdGuid = scrapy.Field()  # 供地结果id
    xzqDm = scrapy.Field()  # 行政区代码
    tdZl = scrapy.Field()  # 土地坐落
    gyFs = scrapy.Field()  # 供应方式
    gyMj = scrapy.Field()  # 土地面积
    tdYt = scrapy.Field()  # 土地用途
    qdRq = scrapy.Field()  # 签订日期
    xzqFullName = scrapy.Field()  # 行政区全称

    srr = scrapy.Field()  # 土地使用权人
    xmMc = scrapy.Field()  # 项目名称
    crNx = scrapy.Field()  # 土地使用年限
    jzMj = scrapy.Field()  # 建筑面积
    minRjl = scrapy.Field()  # 容积率下限
    maxRjl = scrapy.Field()  # 容积率上限
    tdJb = scrapy.Field()  # 土地级别
    dzBaBh = scrapy.Field()  # 电子监管号
    jgSj = scrapy.Field()  # 约定竣工时间
    jdSj = scrapy.Field()  # 约定交地时间
    sjJdSj = scrapy.Field()  # 实际交地时间
    dgSj = scrapy.Field()  # 约定开工时间
    pzRq = scrapy.Field()  # 批准日期
    zdBh = scrapy.Field()  # 宗地编号

    crBzj = scrapy.Field()  # 保证金
    qsj = scrapy.Field()  # 起拍价
    cjJg = scrapy.Field()  # 成交价
    gpSjS = scrapy.Field()  # 招拍挂开始时间
    gpSjE = scrapy.Field()  # 招拍挂结束时间
    gyggGuid = scrapy.Field()  # 出让公告id
    mj = scrapy.Field()  # 土地面积

    other = scrapy.Field()  # 其它
    fetchTime = scrapy.Field()  # 爬取时间
    updateTime = scrapy.Field()  # 更新时间


# landchina 出让公告
class LandChinaGivingItem(scrapy.Item):
    cityName = scrapy.Field()  # 城市
    districtName = scrapy.Field()  # 行政区
    siteName = scrapy.Field()  # 房源（中文名）
    category = scrapy.Field()  # 类别

    fbSj = scrapy.Field()  # 发布时间
    ggLx = scrapy.Field()  # 公告类型
    xzqDm = scrapy.Field()  # 行政区代码
    xzqFullName = scrapy.Field()  # 行政区全称
    gyggGuid = scrapy.Field()  # 出让公告id
    gyggBt = scrapy.Field()  # 出让公告标题
    gyggBh = scrapy.Field()  # 出让公告编号

    zdBh = scrapy.Field()  # 宗地编号
    zdZl = scrapy.Field()  # 宗地坐落
    mj = scrapy.Field()  # 土地面积
    jzMj = scrapy.Field()  # 建筑面积
    srDw = scrapy.Field()  # 土地使用权人
    cjJg = scrapy.Field()  # 成交价
    crBzj = scrapy.Field()  # 保证金
    qsj = scrapy.Field()  # 起拍价
    tdYt = scrapy.Field()  # 土地用途
    gyFs = scrapy.Field()  # 供应方式
    gpSjS = scrapy.Field()  # 招拍挂开始时间
    gpSjE = scrapy.Field()  # 招拍挂结束时间
    minRjl = scrapy.Field()  # 容积率下限
    maxRjl = scrapy.Field()  # 容积率上限

    other = scrapy.Field()  # 其它
    fetchTime = scrapy.Field()  # 爬取时间
    updateTime = scrapy.Field()  # 更新时间
